package ysc.cqnu.operdb.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import ysc.cqnu.operdb.entity.ReceiveUserInfo;
import ysc.cqnu.operdb.entity.ResultData;
import ysc.cqnu.operdb.service.UserEmileCheckService;

@CrossOrigin
@Controller
@ResponseBody
public class FindPasswordController {
    @Autowired
    private ResultData resultData;
    @Autowired
    private UserEmileCheckService userEmileCheckService;

    @RequestMapping(value = "/findpassword",method = RequestMethod.POST)
    public ResultData findpassword(@RequestBody ReceiveUserInfo receiveLogin){
        System.out.println("邮箱验证前端已连接");
        resultData = userEmileCheckService.emileCheck(receiveLogin);
        return resultData;
    }
}
